package com.rgp.serviceorder.feign;

import com.rgp.internalcommon.dto.FareTypeDto;
import com.rgp.internalcommon.dto.OrderPriceDto;
import com.rgp.internalcommon.dto.ResponseResult;
import com.rgp.internalcommon.response.FareVersionResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.math.BigDecimal;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-21 19:53
 */
@FeignClient("service-price")
public interface ServicePriceClient {

    @PostMapping("/price-rule/get-newest-version")
    public ResponseResult<FareVersionResponse> getNewestFareVersion(@RequestBody FareTypeDto fareTypeDto);

    @PostMapping("/price-rule/if-exists")
    public ResponseResult<Boolean> ifExists(@RequestBody FareTypeDto fareTypeDto);

    @PostMapping("/order/calculate-price")
    public ResponseResult<BigDecimal> calculateOrderPrice(@RequestBody OrderPriceDto orderPriceDto);
}
